/**
 * 定义通用返回数据类型
 */
export interface ResponseData {
  code: number
  message: string
  ok: boolean
}

/**
 * 定义 SKU 的对象类型
 */
export interface Attr {
  id?: number | string
  attrName?: string
  valueName?: string
  attrId: number | string
  valueId: number | string
}
export interface saleAttr {
  id?: number | string
  saleAttrName?: string
  saleAttrValueName?: string
  saleAttrId: number | string
  saleAttrValueId: number | string
}
export interface SkuData {
  id?: number | string
  createTime?: string
  updateTime?: string
  spuId?: number | string
  price?: number | string
  skuName?: string
  skuDesc?: string
  weight?: number | string
  tmId?: number | string
  category3Id?: number | string
  skuDefaultImg?: string
  isSale?: number | string
  skuAttrValueList?: Attr[]
  skuSaleAttrValueList?: saleAttr[]
  skuImageList?: any[]
}

/**
 * 定义返回 SKU 列表的数据类型
 */
export interface SkuListResponseData extends ResponseData {
  data: {
    records: SkuData[]
    total: number
    size: number
    current: number
    pages: number
    searchCount: boolean
    optimizeCountSql: boolean
    countId: null
    hitCount: boolean
    orders: []
    maxLimit: null
  }
}

/**
 * 定义 SKU 详情的数据类型
 */
export interface SkuInfoResponseData extends ResponseData {
  data: SkuData
}
